/*
 * @Description: 
 * @version: 
 * @Author: wyx
 * @Date: 2020-10-06 09:17:58
 * @LastEditDate: Do not exit
 */
import request from '@/utils/request'

/**
 * 通过memberId查询
 * {} memberId
 */
export function selectAddressByMemberId(memberId){
    return request({url:'/order-service/address/list',method:'get',params:{memberId:memberId}})
}
/**
 * 新建地址
 */
export function insert(address){
    return request({url:'/order-service/address',method:'post',data:address})
}
/**
 * 删除地址
 */
export function deleteAdd(id){
    return request({url:'/order-service/address/'+id,method:'delete'})
}
/**
 * 修改地址
 */
export function updateAdd(address){
    return request({url:'/order-service/address',method:'put',data:address})
}
/**
 * 通过id查询地址
 */
export function selectByIdA(id){
    return request({url:'/order-service/address/'+id,method:'get'})
}

/**
 * 查询默认地址
 */
export function selectDefault(memberId){
    return request({url:'/order-service/address/defaultAddress',method:'get',params:{memberId:memberId}})
}